package com.rem.chat.common.constants;

import com.rem.chat.service.enums.UserContactTypeEnum;

/**
 * @author: Themberfue
 * @date: 2025/6/4 14:12
 * @description:
 */
public class Constants {
    /**
     * 验证码前缀
     */
    public static final String REDIS_KEY_CHECK_CODE = "RemChat:CheckCode:";

    /**
     * 用户心跳前缀
     */
    public static final String REDIS_KEY_WS_USER_HEART_BEAT = "RemChat:WS:User:HeartBeat:";

    /**
     * 用户 token 前缀
     */
    public static final String REDIS_KEY_WS_TOKEN = "RemChat:WS:Token:";

    /**
     * 用户 id 前缀
     */
    public static final String REDIS_KEY_WS_TOKEN_USERID= "RemChat:WS:Token:UserId:";

    /**
     * 用户联系人列表前缀
     */
    public static final String REDIS_KEY_USER_CONTACT = "RemChat:WS:User:Contact:";

    /**
     * 机器人 id
     */
    public static final String ROBOT_UID = UserContactTypeEnum.USER.getPrefix() + "RemRobot";

    /**
     * 系统设置
     */
    public static final String REDIS_KEY_SYSTEM_SETTING = "RemChat:SystemSetting";

    /**
     * 存活 1min
     */
    public static final Long REDIS_KEY_TIME_1MIN = 60L;

    /**
     * 存货 1d
     */
    public static final Long REDIS_KEY_EXPIRES_DAY = REDIS_KEY_TIME_1MIN * 60 * 24;

    /**
     * 长度 20
     */
    public static final Integer LENGTH_20 = 20;

    /**
     * 长度 11
     */
    public static final Integer USER_ID_LENGTH_11 = 11;

    public static final String REM_CHAT = "RemChat";

    /**
     * 存储类型：文件
     */
    public static final String FILE_FOLDER_FILE = "file/";

    /**
     * 存储类型：头像
     */
    public static final String FILE_FOLDER_AVATAR = "avatar/";

    /**
     * 图像后缀
     */
    public static final String IMAGE_SUFFIX = ".png";

    /**
     * 缩略图后缀
     */
    public static final String COVER_IMAGE_SUFFIX = "_cover.png";

    /**
     * 默认申请消息
     */
    public static final String APPLY_INFO_TEMPLATE = "我是%s";

    /**
     * 密码正则 6到 12位
     */
    public static final String REGEX_PASSWORD = "^[0-9A-Za-z]{6,12}$";

    /**
     * 存储类型：安装包
     */
    public static final String FILE_FOLDER_UPDATE = "update/";

    /**
     * 安装包后缀
     */
    public static final String UPDATE_SUFFIX = ".exe";

    /**
     * 图片后缀合集
     */
    public static final String[] IMAGE_SUFFIX_LIST = {".jpeg", ".jpg", ".png", ".webp", ".bmp", ".gif"};

    /**
     * 视频后缀合集
     */
    public static final String[] VIDEO_SUFFIX_LIST = {".mp4", ".avi", ".rmvb", ".mkv", ".mov"};

    public static final Long FILE_SIZE_MB = 1024 * 1024L;

    public static final Integer ZERO = 0;
}
